package com.tisson.bo;

import java.util.ArrayList;
import java.util.List;

import com.tisson.dao.AcBuildingDAO;
import com.tisson.pojo.AcBuilding;


public class BuildingBO {

	public void delete(AcBuilding building){
		try{
			AcBuildingDAO dao = new AcBuildingDAO();
			dao.delete(building);
		}catch(Exception e){
			e.printStackTrace();
		}
	}
	
	public void add(AcBuilding building){
		try{
			AcBuildingDAO dao = new AcBuildingDAO();
			dao.save(building);
		}catch(Exception e){
			e.printStackTrace();
		}
	}
	
	public AcBuilding findById(String id){
		try{
			AcBuildingDAO dao = new AcBuildingDAO();
			return dao.findById(id);
		}catch(Exception e){
			e.printStackTrace();
			return new AcBuilding();
		}
	}
	
	public void update(AcBuilding building){
		try{
			AcBuildingDAO dao = new AcBuildingDAO();
			dao.update(building);
		}catch(Exception e){
			e.printStackTrace();
		}
	}
}
